package com.cskaoyan.controller;

import com.cskaoyan.service.AccountService;
import com.cskaoyan.vo.BaseRespVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author stone
 * @date 2022/03/31 20:46
 */
@RestController
@RequestMapping("account")
public class AccountController {

    @Autowired
    AccountService accountService;

    @RequestMapping("transfer")
    public BaseRespVo transfer(Integer fromId, Integer destId, double money) {
        accountService.transfer(fromId, destId, money);
        return BaseRespVo.ok(null);
    }
}
